﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceEntity.ViewModel
{
    public class DeviceViewModel : Notify
    {
        string _DeviceType;
        /// <summary>
        /// 仪器型号
        /// </summary>
        public string DeviceType
        {
            get { return _DeviceType; }
            set { _DeviceType = value; RaisePropertyChanged("DeviceType"); }
        }
        string _DeviceName;
        /// <summary>
        /// 仪器标识
        /// </summary>
        public string DeviceName
        {
            get { return _DeviceName; }
            set { _DeviceName = value; RaisePropertyChanged("DeviceName"); }
        }
        string _DeviceConfig;
        /// <summary>
        /// 仪器设置
        /// </summary>
        public string DeviceConfig
        {
            get { return _DeviceConfig; }
            set { _DeviceConfig = value; RaisePropertyChanged("DeviceConfig"); }
        }
    }
    public class Notify : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void RaisePropertyChanged(string propertyname)
        {
            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}
